<template>
  <div class="app-container">
    <el-row>
      <el-col :span="24">
        <el-form ref="searchForm" :inline="true" :model="searchForm" size="small">
          <el-form-item label="搜索名称" prop="server_name">
            <el-input v-model="searchForm.server_name" size="small" placeholder="待改"/>
          </el-form-item>
          <el-form-item>
            <el-button
              type="primary"
              size="small"
              icon="search"
              @click="searchToolChange('searchForm')">查询
            </el-button>
            <el-button type="primary" size="small" @click="searchToolReset('searchForm')">重置</el-button>
          </el-form-item>
        </el-form>
      </el-col>
    </el-row>
    <el-row>
      <el-table :data="tableData1" border highlight-current-row size="small" style="width: 100%">
        <el-table-column label="序号" type="index" width="65"/>
        <el-table-column prop="order_time" label="充值时间"/>
        <el-table-column prop="order_sn" label="订单号"/>
        <el-table-column prop="order_money" label="充值金额"/>
        <el-table-column prop="largess_money" label="赠送金额"/>
        <el-table-column prop="balance" label="余额"/>
        <el-table-column prop="pay_type" label="支付方式"/>
      </el-table>
    </el-row>
    <el-row>
      <el-col :span="12" :offset="12">
        <div style="float: right;">
          <el-pagination
            :current-page.sync="currentPage"
            :page-sizes="[10, 25, 50, 100]"
            :page-size="100"
            :total="1000"
            layout="total, sizes, prev, pager, next, jumper"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"/>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'ChargeLog',
  components: {},
  data() {
    return {
      currentPage: 1,
      searchForm: {
        server_name: ''
      },
      tableData1: [
        {
          order_time: '2019-01-01 01:01:01',
          order_sn: '8888888888',
          order_money: '100.00',
          largess_money: '11.11',
          balance: '111.11',
          pay_type: '支付宝'
        }
      ]
    }
  },
  methods: {
    handleSizeChange(v) {
      console.log(v)
    },
    handleCurrentChange(v) {
      console.log(v)
    },
    searchToolReset(name) {
      this.$refs[name].resetFields()
    },
    searchToolChange(name) {
      console.log(name)
    },
    HandleRenewalFee(row) {
      console.log(row)
    }
  }
}
</script>

<style lang="scss" scoped>
  .tab-container{
    margin: 20px 0 0 20px;
  }
</style>
